import request from '@/utils/request'

// 查询产品配件列表
export function listParts (query) {
    return request({
        url: '/product/parts/list',
        method: 'get',
        params: query
    })
}

// 查询产品配件详细
export function getParts (id) {
    return request({
        url: '/product/parts/' + id,
        method: 'get'
    })
}

// 新增产品配件
export function addParts (data) {
    return request({
        url: '/product/parts',
        method: 'post',
        data: data
    })
}

// 修改产品配件
export function updateParts (data) {
    return request({
        url: '/product/parts',
        method: 'put',
        data: data
    })
}

// 删除产品配件
export function delParts (id) {
    return request({
        url: '/product/parts/' + id,
        method: 'delete'
    })
}

// 删除产品配件
export function getPartsOptions () {
    return request({
        url: '/product/parts/getPartsOptions',
        method: 'get'
    })
}
